import sys
from PyQt5.QtWidgets import QApplication, QDialog
from ui.register_dialog import RegisterDialog

def main():
    app = QApplication(sys.argv)

    def on_register_success():
        print(f"[测试通过] 注册成功")

    dialog = RegisterDialog(on_register_success)
    result = dialog.exec_()

    if result == QDialog.Accepted:
        print("[测试结果] 用户点击了确认")
    else:
        print("[测试结果] 用户点击了取消或关闭")

if __name__ == "__main__":
    main()